﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace CultuRAM.Models
{
    [Table("Places")]
    public class Place
    {
        [Key]
        public int PlaceId { get; set; }

        [Required(ErrorMessage = "O campo {0} é de preenchimento obrigatório!")] 
        [Display(Name = "Local")]
        public string NamePlace { get; set; }

        [Display(Name = "Coordendas")]
        public string Coordinates { get; set; }

        [Display(Name = "Município")]
        public int? CityId { get; set; }

        [Display(Name = "Município")]
        [ForeignKey("CityId")]
        public virtual City City { get; set; }
    }
}